<div class="layui-card">
    <div class="layui-card-header">
        <h2>更新项目</h2>
    </div>
    <div class="layui-card-body">
        <form class="layui-form" action="<?php echo \yii\helpers\Url::to(['edit','id'=>$model->id])?>" method="post">
            <div class="layui-form-item">
                <label for="" class="layui-form-label">客户姓名</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" value="<?php echo $model->name; ?>" placeholder="请输入姓名" lay-verify="required"  class="layui-input">
                </div>
                <div class="layui-word-aux layui-form-mid"><?php echo $model->getFirstError('name'); ?></div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">客户性别</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="3" title="保密" <?php if ($model->isNewRecord||$model->sex==3){echo 'checked';} ?> >
                    <input type="radio" name="sex" value="1" title="男" <?php if ($model->sex==1){echo 'checked';} ?> >
                    <input type="radio" name="sex" value="2" title="女" <?php if ($model->sex==2){echo 'checked';} ?> >
                </div>
                <div class="layui-word-aux layui-form-mid"><?php echo $model->getFirstError('sex'); ?></div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">联系电话</label>
                <div class="layui-input-inline">
                    <input type="tel" name="phone" value="<?php echo $model->phone; ?>" placeholder="请输入电话" lay-verify="required|phone"  class="layui-input">
                </div>
                <div class="layui-word-aux layui-form-mid"><?php echo $model->getFirstError('phone'); ?></div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">其它电话</label>
                <div class="layui-input-inline">
                    <input type="tel" name="other_phone" value="<?php echo $model->other_phone; ?>" placeholder="可留空" class="layui-input">
                </div>
                <div class="layui-word-aux layui-form-mid"><?php echo $model->getFirstError('other_phone'); ?></div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">公司名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="company" value="<?php echo $model->company; ?>" placeholder="请输入公司名称" lay-verify="required"  class="layui-input">
                </div>
                <div class="layui-word-aux layui-form-mid"><?php echo $model->getFirstError('company'); ?></div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" lay-submit class="layui-btn">确认</button>
                    <a href="<?php echo \yii\helpers\Url::to(['index']); ?>" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>


<?php
$js = <<<JS
    layui.use(['form','element','table', 'layer'],function() {
        var form = layui.form;  
        var element = layui.element;  
        var table = layui.table;  
        var layer = layui.layer;  
        
    });
JS;
$this->registerJs($js);
